import request from "@/utils/request.js";

// 获取用户详细信息
export function getParking(params) {
  return request({
    url: "/parking/index",
    method: "get",
    params,
  });
}

// 增加
export function postParking(data) {
  return request({
    url: "/parking/index",
    method: "post",
    data,
  });
}

// 获取详情
export const getParkingApi = (id) => {
  return request({
    url: "/parking/index/" + id,
    method: "get",
  });
};

// 修改
export const putParkingApi = (data) => {
  return request({
    url: "/parking/index/" + data.id,
    method: "put",
    data,
  });
};

// 删除
export const delParkingApi = (id) => {
  return request({
    url: "/parking/index/" + id,
    method: "delete",
  });
};
